<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>自动滚动的拖拽效果</title>
  <link rel="stylesheet" href="jquery-ui-1.10.4/css/ui-lightness/jquery-ui-1.10.4.css">
  <script src="jquery-ui-1.10.4/js/jquery-1.10.2.js"></script>
  <script src="jquery-ui-1.10.4/js/jquery-ui-1.10.4.js"></script>
  <style>
  #draggable, #draggable2, #draggable3 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
  </style>
  <script type="text/javascript">
  $(function() {
    $( "#draggable" ).draggable({ scroll: true });    //设置控件可滚动
	//设置控件可滚动，滚动灵敏度设置为100
    $( "#draggable2" ).draggable({ scroll: true, scrollSensitivity: 100 });
	//设置控件可滚动，滚动速度设置为100
    $( "#draggable3" ).draggable({ scroll: true, scrollSpeed: 100 });
  });
  </script>
</head>
<body>
 
<div id="draggable" class="ui-widget-content">
  <p>默认的设置，scroll设置为true时的滚动效果 </p>
</div>
<div id="draggable2" class="ui-widget-content">
  <p>scrollSensitivity滚动灵敏度设置为100</p>
</div>
<div id="draggable3" class="ui-widget-content">
  <p>scrollSpeed滚动速度设置为100</p>
</div>
<div style="height: 5000px; width: 1px;"></div>
</body>
</html>
